﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageAfterLogin.master" AutoEventWireup="true" CodeFile="Groups.aspx.cs" Inherits="Contacts" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<h1>Your Contact Groups</h1>
<table>
    <tr>
        <td>
            Group Name
        </td>
        <td>
            :
        </td>
        <td>
            <asp:TextBox ID="txtGroupName" runat="server"></asp:TextBox>
        </td>
        <td>
            <asp:HiddenField ID="hfLoginID" runat="server" />
            <asp:HiddenField ID="hfGroupID" runat="server" />
            <asp:Button ID="btnSave" runat="server" Text="Save" onclick="btnSaveGroup_Click" />
        </td>
    </tr>
     
</table>
 <asp:GridView ID="gvGroup" runat="server" AutoGenerateColumns="false" CssClass="gridCss" Width="100%">
            <Columns>
                <asp:TemplateField HeaderText="Select">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbSelect" runat="server" CommandArgument='<%#Eval("GroupID") %>' OnClick="lbSelect_Click">
                            Edit
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Group Name">
                    <ItemTemplate>
                        <asp:Label ID="lblHeadTypeName" runat="server" Text='<%#Eval("GroupName") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="No. of Contacts">
                    <ItemTemplate>
                        <asp:Label ID="lblExtraField1" runat="server" Text='<%#Eval("NoOfContacts") %>'>
                        </asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbDelete" runat="server" OnClientClick="return confirm('Are You Sure To Delete?')"  CommandArgument='<%#Eval("GroupID") %>' OnClick="lbDeleteGroup_Click">
                            Delete
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
<table>
   
</asp:Content>

